package com.hsy.crm.web.domain.entity;

import com.hsy.crm.web.domain.cm.NotInit;
import com.hsy.crm.web.domain.cm.Validate;

import javax.persistence.Column;
import javax.persistence.Table;

@Table(name = "sys_account")
public class Account extends BaseEntity {

    @Column(length = 20)
    @Validate
    private String name;

    @Validate
    @Column(length = 20)
    private Long initBalance;

    @Column(length = 20)
    private Long balance;

    /**
     * -100 总账户
     */
    @Column(length = 1)
    @Validate
    private Integer type;

    @Column(length = 20)
    @Validate
    private Long initDate;

    @NotInit
    @Column(length = 20)
    @Validate
    private Long companyId;

    @Validate
    private Long createUserId;

    @Validate
    private Long createTime;

    @Validate(insert=false,update=true)
    private Long updateUserId;

    @Validate(insert=false,update=true)
    private Long updateTime;

    public Long getBalance() {
        return balance;
    }

    public void setBalance(Long balance) {
        this.balance = balance;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Long getInitBalance() {
        return initBalance;
    }

    public void setInitBalance(Long initBalance) {
        this.initBalance = initBalance;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getInitDate() {
        return initDate;
    }

    public void setInitDate(Long initDate) {
        this.initDate = initDate;
    }

    public Long getCreateUserId() {
        return createUserId;
    }

    public void setCreateUserId(Long createUserId) {
        this.createUserId = createUserId;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateUserId() {
        return updateUserId;
    }

    public void setUpdateUserId(Long updateUserId) {
        this.updateUserId = updateUserId;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }
}
